package es.ats.codington.festival.mappers;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import es.ats.codington.festival.domain.Place.Zone;

import es.ats.codington.festival.domain.Theater;



public class TheaterMapper implements RowMapper<Theater>{

	@Override
	public Theater mapRow(ResultSet resultSet, int numRow) throws SQLException {
		Theater theater = new Theater();
		

		theater.setIdPlace(resultSet.getInt("idPlace"));
		theater.setPlaceName(resultSet.getString("placeName"));
		theater.setZone(Zone.NORTH);
		theater.setCapacity(resultSet.getInt("capacity"));
		theater.setTheaterName(resultSet.getString("theaterName"));
			
			
		return theater;
	}

}
